package com.nari.ncps.screen.vo.electric;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 电厂年度排放统计 VO
 * </p>
 *
 * @author xuesong
 * @since 2025-09-24
 */
@Data
@Schema(description = "电厂年度排放统计数据")
public class PlantAnnualEmissionStatistics implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "年份")
    private Integer year;

    @Schema(description = "公司编码")
    private String companyCode;

    @Schema(description = "公司名称")
    private String companyName;

    @Schema(description = "电厂编码")
    private String plantCode;

    @Schema(description = "电厂名称")
    private String plantName;

    @Schema(description = "机组数量")
    private Integer unitCount;

    @Schema(description = "运行状态(0:正常,1:异常)")
    private Integer status;

    @Schema(description = "状态描述")
    private String statusDesc;

    @Schema(description = "年累计粉尘排放量")
    private Long totalDustAmount;

    @Schema(description = "粉尘排放标准")
    private Integer dustStandard;

    @Schema(description = "年累计硫化物排放量")
    private Long totalSulfurAmount;

    @Schema(description = "硫化物排放标准")
    private Integer sulfurStandard;

    @Schema(description = "年累计氮氧化物排放量")
    private Long totalNitrogenAmount;

    @Schema(description = "氮氧化物排放标准")
    private Integer nitrogenStandard;

    @Schema(description = "粉尘排放达标率(%)")
    private Double dustComplianceRate;

    @Schema(description = "硫化物排放达标率(%)")
    private Double sulfurComplianceRate;

    @Schema(description = "氮氧化物排放达标率(%)")
    private Double nitrogenComplianceRate;

    @Schema(description = "综合排放达标率(%)")
    private Double overallComplianceRate;

    @Schema(description = "数据记录条数")
    private Integer recordCount;

    /**
     * 获取状态描述
     */
    public String getStatusDesc() {
        if (status == null) {
            return "未知";
        }
        return status == 0 ? "正常" : "异常";
    }
}
